mui.init({ swipeBack: false });
function  initView(){	
window.addEventListener('changeVal', function(event) {
	var showWin = event.detail.showWin;
	if(showWin == 1) {
		//触发弹窗
		plus.nativeUI.actionSheet({
			cancel: "取消",
			buttons: [{
				title: "发布内容"
			}, {
				title: "发布商品"
			}]
		}, function(e) {
			var i = e.index;
			if(i == 1) {
				window.plus.bridge.execSync("community", "pushWebView", "");
				plus.webview.create('release_viewMedia.html','release_viewMedia.html',{hardwareAccelerated:true}).show('fade-in');
//				openPublish('release_viewMedia.html')
//				mui.openWindow({
//					url:"http://192.168.1.101:8020/shequ_app_web/view/release_viewMedia.html",
//				});
			} else if(i == 2) {
				if(plus.storage.getItem('merchant') == '1') {
//					plus.webview.create('release_goods.html','release_goods.html').show('pop-in');
					openPublish('release_goods.html');
				} else {
					mui.toast("您还未注册卖家，请完整注册申请，才可以发布商品噢。");
//					plus.webview.create('apply_for_seller.html','apply_for_seller.html').show('pop-in');
					openPublish('apply_for_seller.html');
				}
				window.plus.bridge.execSync("community", "pushWebView", "");
			}
		});
	}
});
}

initView();